package com.linkallcloud.core.enums;

public enum Status implements EnumBase<Integer> {
    Created(0, "创建"), Enabled(1, "启用"), Disabled(2, "弃用"), Deprecated(3, "过期"), Canceled(4, "停用"), Locked(6, "锁定"),
    Quote(7, "引用"), Cancel(8, "取消"), Delete(9, "删除");

    private int code;
    private String message;

    Status(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public static Status get(Integer code) {
        for (Status ul : values()) {
            if (ul.getCode().equals(code)) {
                return ul;
            }
        }
        return null;
    }

}
